﻿using Basic.FormGatewaryModular.Interface;
using Basic.FormRemoteModel.FormViewCol;
using Basic.FormRemoteModel.FormViewCol.Model;

namespace Basic.FormGatewaryModular.Services
{
    internal class FormViewColService : IFormViewColService
    {
        public long Add ( ViewColAdd data )
        {
            return new AddFormViewCol
            {
                Datum = data
            }.Send();
        }
        public void Delete ( long id )
        {
            new DeleteFormViewCol
            {
                Id = id
            }.Send();
        }
        public bool Set ( long id, ViewColSet data )
        {
            return new SetFormViewCol { Id = id, Datum = data }.Send();
        }

        public ViewCol[] Gets ( long formId )
        {
            return new GetFormViewCols
            {
                FormId = formId
            }.Send();
        }

        public ViewCol[] Sync ( ViewColSync data )
        {
            return new SyncFormViewCol
            {
                Datum = data
            }.Send();
        }
    }
}
